import Main from '../pages/Main';
import Cart from '../pages/cart/Cart';
import front from '../pages/sale/front';
// import demoFront from '../pages/sale/demoFront';
import orderList from '../pages/order/orderList';
import Code from '../pages/spread/Code';
import Spread from '../pages/spread/Spread';
import User from '../pages/user/User';
import Error from '../pages/Error';
import HtmlContainer from '../pages/HtmlContainer';

export default [
  {
    path: '/',
    name: 'Main',
    component: Main,
    redirect: '/front',
    children: [
      {
        path: 'cart',
        name: 'cart',
        component: Cart,
        meta: {
          keepAlive: false
        }
      },
      {
        path: 'front',
        name: 'front',
        component: front,
        meta: {
          keepAlive: true // 缓存
        }
      },
      {
        path: 'code',
        name: 'code',
        component: Code,
        meta: {
          keepAlive: false
        }
      },
      {
        path: 'spread',
        name: 'spread',
        component: Spread,
        meta: {
          keepAlive: false
        }
      },
      {
        path: 'user',
        name: 'user',
        component: User,
        meta: {
          keepAlive: false
        }
      }

    ],
    linkActiveClass: 'active'
  },
  {
    path: '*',
    component: Error
  },
  {
    path: '/html_container',
    name: 'htmlContainer',
    component: HtmlContainer
  },
  {
    path: 'orderList',
    name: 'orderList',
    component: orderList
  }
  // {
  //   path: '/splash_screen',
  //   name: 'splashScreen',
  //   component: SplashScreen
  // }
];
